package com.ruoyi.system.ali;

import com.ruoyi.common.enums.ChannelEnum;
import com.ruoyi.system.domain.Order;
import com.ruoyi.system.dto.ApiByPhoneAddDto;
import lombok.Data;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

public interface ChannelService {
      BigDecimal max=new BigDecimal(0.1);
      String limitAmoutKey="user_id_amount:";


    String getType();


    Object create(AliPayDto aliPayDto, Order order);

    Object createByPhone(ApiByPhoneAddDto apiByPhoneAddDto, Order order);

    default List<ChannelVo> getChannel() {
        List<ChannelVo> list = new ArrayList<>();

        for (ChannelEnum item : ChannelEnum.values()) {
            ChannelVo channelVo = new ChannelVo();
            channelVo.setChannelCode(item.getCode());
            channelVo.setChannelName(item.getName());
            list.add(channelVo);

        }

        return list;
    }

    @Data
    class ChannelVo {
        private String channelCode;
        private String channelName;

    }

}
